package com.ln;

import com.ln.service.BookShopService;
import com.ln.service.Carshier;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Ln
 * @version 终极版
 * @date 2022/11/14 17:10
 */
public class Test {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("spring.xml");
//        BookShopService bookShopService = classPathXmlApplicationContext.getBean(BookShopService.class);
//        bookShopService.purchase("1002","栗毅");

        Carshier carshier = classPathXmlApplicationContext.getBean(Carshier.class);
        List<String> list=new ArrayList<String>();
        list.add("1001");
        list.add("1002");
        carshier.buy(list,"栗毅");
    }
}
